package org.examplexx.mytestwebapplication.Mapper;

import org.apache.ibatis.annotations.*;
import org.examplexx.mytestwebapplication.pojo.Dept;

import java.util.List;

@Mapper
public interface DeptMapper {
    @Select("select * from dept")
    public List<Dept> selectAll();
    @Delete("delete from dept where id=#{id}")
    public void deleteById(int id);
    @Insert("insert into dept (dept_name, create_time, update_time) values (#{deptName},now(),now())")
    public void insert(Dept dept);
    @Select("select * from dept where id=#{id}")
    public Dept selectById(int id);
    @Update("update dept set dept_name=#{deptName} where id=#{id}")
    public void update(Dept dept);

}
